licenses(["notice"])

java_test(
    name = "Ed25519SignTest",
    size = "small",
    srcs = ["Ed25519SignTest.java"],
    data = ["@wycheproof//testvectors:all"],
    tags = ["fips"],
    deps = [
        "//src/main/java/com/google/crypto/tink:public_key_sign",
        "//src/main/java/com/google/crypto/tink:public_key_verify",
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/signature:ed25519_private_key",
        "//src/main/java/com/google/crypto/tink/signature/internal/testing:ed25519_test_util",
        "//src/main/java/com/google/crypto/tink/signature/internal/testing:signature_test_vector",
        "//src/main/java/com/google/crypto/tink/subtle:ed25519_sign",
        "//src/main/java/com/google/crypto/tink/subtle:ed25519_verify",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/testing:wycheproof_test_util",
        "@maven//:com_google_code_gson_gson",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "EcdsaVerifyJceTest",
    srcs = ["EcdsaVerifyJceTest.java"],
    data = ["@wycheproof//testvectors:all"],
    tags = ["fips"],
    deps = [
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/subtle:ecdsa_sign_jce",
        "//src/main/java/com/google/crypto/tink/subtle:ecdsa_verify_jce",
        "//src/main/java/com/google/crypto/tink/subtle:elliptic_curves",
        "//src/main/java/com/google/crypto/tink/subtle:enums",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:subtle_util_cluster",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "//src/main/java/com/google/crypto/tink/testing:wycheproof_test_util",
        "@maven//:com_google_code_gson_gson",
        "@maven//:junit_junit",
        "@maven//:org_conscrypt_conscrypt_openjdk_uber",
    ],
)

java_test(
    name = "EcdsaSignJceTest",
    size = "small",
    srcs = ["EcdsaSignJceTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:public_key_sign",
        "//src/main/java/com/google/crypto/tink:public_key_verify",
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/signature:ecdsa_private_key",
        "//src/main/java/com/google/crypto/tink/signature:ecdsa_public_key",
        "//src/main/java/com/google/crypto/tink/signature/internal/testing:ecdsa_test_util",
        "//src/main/java/com/google/crypto/tink/signature/internal/testing:signature_test_vector",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "//src/main/java/com/google/crypto/tink/subtle:ecdsa_sign_jce",
        "//src/main/java/com/google/crypto/tink/subtle:ecdsa_verify_jce",
        "//src/main/java/com/google/crypto/tink/subtle:elliptic_curves",
        "//src/main/java/com/google/crypto/tink/subtle:enums",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "@maven//:junit_junit",
        "@maven//:org_conscrypt_conscrypt_openjdk_uber",
    ],
)

java_test(
    name = "RsaSsaPssVerifyJceTest",
    size = "small",
    srcs = ["RsaSsaPssVerifyJceTest.java"],
    data = ["@wycheproof//testvectors:all"],
    deps = [
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/subtle:enums",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:rsa_ssa_pss_verify_jce",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "//src/main/java/com/google/crypto/tink/testing:wycheproof_test_util",
        "@maven//:com_google_code_gson_gson",
        "@maven//:junit_junit",
        "@maven//:org_conscrypt_conscrypt_openjdk_uber",
    ],
)

java_test(
    name = "BytesTest",
    size = "small",
    srcs = ["BytesTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "EngineFactoryTest",
    size = "small",
    srcs = ["EngineFactoryTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/subtle:subtle_util_cluster",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
        "@maven//:org_conscrypt_conscrypt_openjdk_uber",
    ],
)

java_test(
    name = "EngineFactoryFipsTest",
    size = "small",
    srcs = ["EngineFactoryFipsTest.java"],
    tags = ["fips"],
    deps = [
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/subtle:subtle_util_cluster",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
        "@maven//:org_conscrypt_conscrypt_openjdk_uber",
    ],
)

java_test(
    name = "Ed25519VerifyTest",
    size = "small",
    srcs = ["Ed25519VerifyTest.java"],
    data = ["@wycheproof//testvectors:all"],
    tags = ["fips"],
    deps = [
        "//src/main/java/com/google/crypto/tink:public_key_verify",
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/signature:ed25519_private_key",
        "//src/main/java/com/google/crypto/tink/signature/internal/testing:ed25519_test_util",
        "//src/main/java/com/google/crypto/tink/signature/internal/testing:signature_test_vector",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "//src/main/java/com/google/crypto/tink/subtle:ed25519_verify",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/testing:wycheproof_test_util",
        "@maven//:com_google_code_gson_gson",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "HkdfTest",
    size = "small",
    srcs = ["HkdfTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:hkdf",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "AeadThreadSafetyTest",
    size = "small",
    srcs = ["AeadThreadSafetyTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:mac",
        "//src/main/java/com/google/crypto/tink/subtle:aes_ctr_jce_cipher",
        "//src/main/java/com/google/crypto/tink/subtle:aes_eax_jce",
        "//src/main/java/com/google/crypto/tink/subtle:aes_gcm_jce",
        "//src/main/java/com/google/crypto/tink/subtle:cha_cha20_poly1305",
        "//src/main/java/com/google/crypto/tink/subtle:encrypt_then_authenticate",
        "//src/main/java/com/google/crypto/tink/subtle:ind_cpa_cipher",
        "//src/main/java/com/google/crypto/tink/subtle:prf_hmac_jce",
        "//src/main/java/com/google/crypto/tink/subtle:prf_mac",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/subtle:x_cha_cha20_poly1305",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "RsaSsaPkcs1SignJceTest",
    size = "large",
    srcs = ["RsaSsaPkcs1SignJceTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:public_key_sign",
        "//src/main/java/com/google/crypto/tink:public_key_verify",
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pkcs1_private_key",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pkcs1_public_key",
        "//src/main/java/com/google/crypto/tink/signature/internal/testing:rsa_ssa_pkcs1_test_util",
        "//src/main/java/com/google/crypto/tink/signature/internal/testing:signature_test_vector",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "//src/main/java/com/google/crypto/tink/subtle:enums",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/subtle:rsa_ssa_pkcs1_sign_jce",
        "//src/main/java/com/google/crypto/tink/subtle:rsa_ssa_pkcs1_verify_jce",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "@maven//:junit_junit",
        "@maven//:org_conscrypt_conscrypt_openjdk_uber",
    ],
)

java_test(
    name = "RsaSsaPssSignJceTest",
    size = "large",
    srcs = ["RsaSsaPssSignJceTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:public_key_sign",
        "//src/main/java/com/google/crypto/tink:public_key_verify",
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pss_private_key",
        "//src/main/java/com/google/crypto/tink/signature/internal/testing:rsa_ssa_pss_test_util",
        "//src/main/java/com/google/crypto/tink/signature/internal/testing:signature_test_vector",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "//src/main/java/com/google/crypto/tink/subtle:enums",
        "//src/main/java/com/google/crypto/tink/subtle:rsa_ssa_pss_sign_jce",
        "//src/main/java/com/google/crypto/tink/subtle:rsa_ssa_pss_verify_jce",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "@maven//:junit_junit",
        "@maven//:org_conscrypt_conscrypt_openjdk_uber",
    ],
)

java_test(
    name = "AesEaxJceTest",
    size = "small",
    srcs = ["AesEaxJceTest.java"],
    data = ["@wycheproof//testvectors:all"],
    tags = ["fips"],
    deps = [
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink/aead:aes_eax_key",
        "//src/main/java/com/google/crypto/tink/aead:aes_eax_parameters",
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/subtle:aes_eax_jce",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "//src/main/java/com/google/crypto/tink/testing:wycheproof_test_util",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_gson_gson",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "DaeadThreadSafetyTest",
    size = "small",
    srcs = ["DaeadThreadSafetyTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:deterministic_aead",
        "//src/main/java/com/google/crypto/tink/subtle:aes_siv",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "AesGcmHkdfStreamingTest",
    size = "large",
    srcs = ["AesGcmHkdfStreamingTest.java"],
    tags = ["notsan"],
    deps = [
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:streaming_aead",
        "//src/main/java/com/google/crypto/tink/streamingaead:aes_gcm_hkdf_streaming_key",
        "//src/main/java/com/google/crypto/tink/streamingaead:aes_gcm_hkdf_streaming_parameters",
        "//src/main/java/com/google/crypto/tink/subtle:aes_gcm_hkdf_streaming",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/testing:streaming_test_util",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "ValidatorsTest",
    size = "small",
    srcs = ["ValidatorsTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/subtle:enums",
        "//src/main/java/com/google/crypto/tink/subtle:validators",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "SelfKeyTestValidatorsTest",
    srcs = ["SelfKeyTestValidatorsTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/subtle:elliptic_curves",
        "//src/main/java/com/google/crypto/tink/subtle:enums",
        "//src/main/java/com/google/crypto/tink/subtle:selfkeytests_validators",
        "//src/main/java/com/google/crypto/tink/subtle:subtle_util_cluster",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "EncryptThenAuthenticateTest",
    size = "small",
    srcs = ["EncryptThenAuthenticateTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:crypto_format",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink/aead:aes_ctr_hmac_aead_key",
        "//src/main/java/com/google/crypto/tink/aead:aes_ctr_hmac_aead_parameters",
        "//src/main/java/com/google/crypto/tink/subtle:encrypt_then_authenticate",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "SubtleUtilTest",
    size = "small",
    srcs = ["SubtleUtilTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/subtle:enums",
        "//src/main/java/com/google/crypto/tink/subtle:subtle_util_cluster",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "AesSivTest",
    size = "small",
    srcs = ["AesSivTest.java"],
    data = ["@wycheproof//testvectors:all"],
    tags = ["fips"],
    deps = [
        "//src/main/java/com/google/crypto/tink:deterministic_aead",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/daead:aes_siv_key",
        "//src/main/java/com/google/crypto/tink/daead:aes_siv_parameters",
        "//src/main/java/com/google/crypto/tink/mac/internal:aes_util",
        "//src/main/java/com/google/crypto/tink/subtle:aes_siv",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/testing:wycheproof_test_util",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_gson_gson",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "PrfHmacJceTest",
    size = "small",
    srcs = ["PrfHmacJceTest.java"],
    tags = ["fips"],
    deps = [
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:mac",
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/prf:hmac_prf_key",
        "//src/main/java/com/google/crypto/tink/prf:hmac_prf_parameters",
        "//src/main/java/com/google/crypto/tink/prf:prf_set",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:prf_hmac_jce",
        "//src/main/java/com/google/crypto/tink/subtle:prf_mac",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
        "@maven//:org_conscrypt_conscrypt_openjdk_uber",
    ],
)

java_test(
    name = "KwpTest",
    size = "small",
    srcs = ["KwpTest.java"],
    data = ["@wycheproof//testvectors:all"],
    deps = [
        "//src/main/java/com/google/crypto/tink:key_wrap",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:kwp",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "//src/main/java/com/google/crypto/tink/testing:wycheproof_test_util",
        "@maven//:com_google_code_gson_gson",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "ChaCha20Poly1305Test",
    size = "small",
    srcs = ["ChaCha20Poly1305Test.java"],
    data = ["@wycheproof//testvectors:all"],
    tags = [
        "fips",
        "notsan",
    ],
    deps = [
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink/aead:cha_cha20_poly1305_key",
        "//src/main/java/com/google/crypto/tink/aead:cha_cha20_poly1305_parameters",
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "//src/main/java/com/google/crypto/tink/subtle:cha_cha20_poly1305",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "//src/main/java/com/google/crypto/tink/testing:wycheproof_test_util",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_gson_gson",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "AesGcmJceTest",
    srcs = ["AesGcmJceTest.java"],
    data = ["@wycheproof//testvectors:all"],
    tags = [
        "fips",
        "notsan",
    ],
    deps = [
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_key",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_parameters",
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/subtle:aes_gcm_jce",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "//src/main/java/com/google/crypto/tink/testing:wycheproof_test_util",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_code_gson_gson",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
        "@maven//:org_conscrypt_conscrypt_openjdk_uber",
    ],
)

java_test(
    name = "PrfAesCmacTest",
    size = "small",
    srcs = ["PrfAesCmacTest.java"],
    tags = ["fips"],
    deps = [
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:mac",
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/prf:aes_cmac_prf_key",
        "//src/main/java/com/google/crypto/tink/prf:aes_cmac_prf_parameters",
        "//src/main/java/com/google/crypto/tink/prf:prf_set",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:prf_aes_cmac",
        "//src/main/java/com/google/crypto/tink/subtle:prf_mac",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "StreamingAeadThreadSafetyTest",
    size = "small",
    srcs = ["StreamingAeadThreadSafetyTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:streaming_aead",
        "//src/main/java/com/google/crypto/tink/subtle:aes_ctr_hmac_streaming",
        "//src/main/java/com/google/crypto/tink/subtle:aes_gcm_hkdf_streaming",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/testing:streaming_test_util",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "RsaSsaPkcs1VerifyJceTest",
    size = "small",
    srcs = ["RsaSsaPkcs1VerifyJceTest.java"],
    data = ["@wycheproof//testvectors:all"],
    tags = ["fips"],
    deps = [
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/subtle:enums",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:rsa_ssa_pkcs1_verify_jce",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "//src/main/java/com/google/crypto/tink/testing:wycheproof_test_util",
        "@maven//:com_google_code_gson_gson",
        "@maven//:junit_junit",
        "@maven//:org_conscrypt_conscrypt_openjdk_uber",
    ],
)

java_test(
    name = "AesCtrJceCipherTest",
    size = "small",
    srcs = ["AesCtrJceCipherTest.java"],
    tags = ["fips"],
    deps = [
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/subtle:aes_ctr_jce_cipher",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "@maven//:junit_junit",
        "@maven//:org_conscrypt_conscrypt_openjdk_uber",
    ],
)

java_test(
    name = "XChaCha20Test",
    size = "small",
    srcs = ["XChaCha20Test.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:ind_cpa_cipher",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/subtle:x_cha_cha20",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "XChaCha20Poly1305Test",
    size = "large",
    srcs = ["XChaCha20Poly1305Test.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink/aead:x_cha_cha20_poly1305_key",
        "//src/main/java/com/google/crypto/tink/aead:x_cha_cha20_poly1305_parameters",
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/subtle:x_cha_cha20_poly1305",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "RewindableReadableByteChannelTest",
    size = "small",
    srcs = ["RewindableReadableByteChannelTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/subtle:rewindable_readable_byte_channel",
        "//src/main/java/com/google/crypto/tink/testing:streaming_test_util",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "ChaCha20Test",
    size = "small",
    srcs = ["ChaCha20Test.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "//src/main/java/com/google/crypto/tink/subtle:cha_cha20",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:ind_cpa_cipher",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "PemKeyTypeTest",
    size = "small",
    srcs = ["PemKeyTypeTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/subtle:pem_key_type",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "EllipticCurvesTest",
    size = "small",
    srcs = ["EllipticCurvesTest.java"],
    data = ["@wycheproof//testvectors:all"],
    deps = [
        "//src/main/java/com/google/crypto/tink/subtle:elliptic_curves",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:subtle_util_cluster",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "//src/main/java/com/google/crypto/tink/testing:wycheproof_test_util",
        "@maven//:com_google_code_gson_gson",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "AesCtrHmacStreamingTest",
    srcs = ["AesCtrHmacStreamingTest.java"],
    tags = [
        "fips",
        "notsan",
    ],
    deps = [
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:streaming_aead",
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/streamingaead:aes_ctr_hmac_streaming_key",
        "//src/main/java/com/google/crypto/tink/streamingaead:aes_ctr_hmac_streaming_parameters",
        "//src/main/java/com/google/crypto/tink/subtle:aes_ctr_hmac_streaming",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/testing:streaming_test_util",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "SignatureThreadSafetyTest",
    size = "small",
    srcs = ["SignatureThreadSafetyTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:public_key_sign",
        "//src/main/java/com/google/crypto/tink:public_key_verify",
        "//src/main/java/com/google/crypto/tink/subtle:ecdsa_sign_jce",
        "//src/main/java/com/google/crypto/tink/subtle:ecdsa_verify_jce",
        "//src/main/java/com/google/crypto/tink/subtle:ed25519_sign",
        "//src/main/java/com/google/crypto/tink/subtle:ed25519_verify",
        "//src/main/java/com/google/crypto/tink/subtle:elliptic_curves",
        "//src/main/java/com/google/crypto/tink/subtle:enums",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "X25519Test",
    size = "small",
    srcs = ["X25519Test.java"],
    data = ["@wycheproof//testvectors:all"],
    deps = [
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:x25519",
        "//src/main/java/com/google/crypto/tink/testing:wycheproof_test_util",
        "@maven//:com_google_code_gson_gson",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "Base64Test",
    size = "small",
    srcs = ["Base64Test.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/subtle:base64",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "PrfMacTest",
    size = "small",
    srcs = ["PrfMacTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:mac",
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/mac/internal:aes_cmac_test_util",
        "//src/main/java/com/google/crypto/tink/mac/internal:hmac_test_util",
        "//src/main/java/com/google/crypto/tink/subtle:prf_mac",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
        "@maven//:org_conscrypt_conscrypt_openjdk_uber",
    ],
)

java_test(
    name = "RandomTest",
    size = "small",
    srcs = ["RandomTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)
